/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.notes.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.modules.notes.entity.JpNotes;
import com.jeeplus.modules.notes.mapper.JpNotesMapper;

/**
 * 办案手记Service
 * @author 姜盼
 * @version 2020-09-20
 */
@Service
@Transactional(readOnly = true)
public class JpNotesService extends TreeService<JpNotesMapper, JpNotes> {

	public JpNotes get(String id) {
		return super.get(id);
	}
	
	public List<JpNotes> findList(JpNotes jpNotes) {
		if (StringUtils.isNotBlank(jpNotes.getParentIds())){
			jpNotes.setParentIds(","+jpNotes.getParentIds()+",");
		}
		return super.findList(jpNotes);
	}
	
	@Transactional(readOnly = false)
	public void save(JpNotes jpNotes) {
		super.save(jpNotes);
	}
	
	@Transactional(readOnly = false)
	public void delete(JpNotes jpNotes) {
		super.delete(jpNotes);
	}
	
}